package com.rec.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import com.rec.service.UsersService;
@RestController
@RequestMapping("user")
@CrossOrigin
public class UsersController {
		@Autowired
		private UsersService s;
		
		@RequestMapping("/index")
		public ModelAndView in(ModelAndView mv) {
			mv.setViewName("login");
			return mv;
		}
		@RequestMapping("getIndex")
		public Integer GetIndex(String username,String password) {
			return s.getIndex(username, password);
		}
}
